import re
from playwright.sync_api import Playwright, sync_playwright, expect


def run(playwright: Playwright) -> None:
    browser = playwright.chromium.launch(headless=False)
    context = browser.new_context()
    page = context.new_page()
    page.goto("https://emsp-test.eiceducation.com.cn/admin/login")
    page.locator('#username').click()
    page.locator('#username').fill("mumulin")
    page.locator('#username').press("Tab")
    page.locator('#password').fill("h1058386570")
    page.get_by_role("button", name="登 录").click()

    # ---------------------
    context.close()
    browser.close()


with sync_playwright() as playwright:
    run(playwright)
